package com.spring.boot.utils.processor;

import com.spring.boot.utils.GenStars;

import java.util.function.Function;

/**
 * 通用处理敏感信息格式
 */
public class CommonProcessor implements Function<Object,Object> {

    public CommonProcessor(){

    }

    @Override
    public Object apply(Object sensitiveInfo) {
        if (sensitiveInfo==null){
            return null;
        }
        return sensitiveInfo instanceof String?GenStars.handle(6):sensitiveInfo;
    }
}
